<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Silver Business Logic layer - .alp parser -->
<!-- version 1.0  -->
<!-- March 18, 2009 -->
<!-- Authors: Team Bronze  -->
<!-- Derived from AnyModel Parameter Slurper XSLT composed by J.T. Dorion and Josh Goodwin -->


<!--
<xsl:template match="AnyLogicWorkspace">
	<xsl:if test="@AlpVersion='6.0.12'">
		<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass"/>
		</Parameters>
	</xsl:if>
	<xsl:if test="@AlpVersion='6.0.11'">
		<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass"/>
		</Parameters>
	</xsl:if>
	<xsl:if test="@AlpVersion='6.2.2'">
		<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass"/>
		</Parameters>
	</xsl:if>
</xsl:template>
-->

<xsl:template match="AnyLogicWorkspace">
	<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass"/>
		</Parameters>
</xsl:template>

<xsl:template match="AnyLogicWorkspace/Model/ActiveObjectClasses/ActiveObjectClass">
	<!-- Start with ActiveObject and loop through Variables -->
	<xsl:for-each select="Variables/Variable">		
		<xsl:if test="@Class='Parameter'">
			<Parameter>
				<Name> <xsl:value-of select="Name"/> </Name>
				<DefaultValue> <xsl:value-of select="Properties/DefaultValue"/> </DefaultValue>
				<Type> <xsl:value-of select="Properties/Type"/> </Type>
				<Object> <xsl:value-of select="ancestor::ActiveObjectClass/Name"/> </Object>
			</Parameter>
		</xsl:if>
	</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
